from ultralytics import YOLO

model = YOLO("yolo11m-cls.pt")

def inference(image):
    return model(image)

if __name__ == "__main__":
    filename = "IMG_0658.JPG"
    filein = "/Users/v/Documents/proj/testdata/" + filename
    results = inference(filein)
    for r in results:
        print(r.probs.top1)
        print(r.names[r.probs.top1])
